import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home"
  },
  {
    path: "/home",
    meta: {
      nav: {
        isNav: true,
        navName: "音乐大厅",
        icon: "icon-faxian-copy"
      }
    },
    component: () => import("@/pages/home")
  },
  {
    path: "/friedns",
    meta: {
      nav: {
        isNav: true,
        navName: "魔友",
        icon: "icon-pengyou"
      }
    },
    component: () => import("@/pages/friends")
  },
  {
    path: "/compose",
    meta: {
      nav: {
        isNav: true,
        navName: "发布",
        icon: "icon-fabu"
      }
    },
    component: () => import("@/pages/compose")
  },
  {
    path: "/singers",
    meta: {
      nav: {
        isNav: true,
        navName: "歌手",
        icon: "icon-SINGER"
      }
    }
  },
  {
    path: "/mine",
    meta: {
      nav: {
        isNav: true,
        navName: "我的",
        icon: "icon-ziyuan"
      }
    },
    component: () => import("@/pages/mine")
  }
];

const router = new VueRouter({
  routes
});

export default router;
